//
//  SubVideoCollectionViewCell.m
//  HelpThePoor
//
//  Created by van7ish on 2016/12/2.
//  Copyright © 2016年 van7ish. All rights reserved.
//

#import "SubVideoCollectionViewCell.h"

@implementation SubVideoCollectionViewCell

- (UIImageView *)coverImageView{
    if (!_coverImageView) {
        _coverImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height - HeightScale(24))];
        _coverImageView.image = ImageNamed(@"3");
        _coverImageView.layer.cornerRadius = WidthScale(8);
        _coverImageView.layer.masksToBounds = YES;
    }
    return _coverImageView;
}

- (UIImageView *)playImageView{
    if (!_playImageView) {
        _playImageView = [[UIImageView alloc] initWithFrame:CGRectMake(WidthScale(5), self.coverImageView.frame.size.height - HeightScale(20), WidthScale(16), HeightScale(15))];
        _playImageView.image = ImageNamed(@"video");
    }
    return _playImageView;
}

- (UILabel *)titleLabel{
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, self.frame.size.height - HeightScale(24), self.frame.size.width, HeightScale(24))];
        _titleLabel.text = @"【商务礼仪】";
        _titleLabel.font = FONTSIZE(15);
        _titleLabel.textColor = COLOR_FONTBLACK;
    }
    return _titleLabel;
}

- (void)layoutSubviews{
    [super layoutSubviews];
    
    [self.contentView addSubview:self.coverImageView];
    [self.contentView addSubview:self.playImageView];
    [self.contentView addSubview:self.titleLabel];
}

@end
